{% extends "layout.html" %}
{% set title = _('Global Module Index') %}
{% block extrahead %}
{{ super() }}
{% if builder != 'htmlhelp' and collapse_modindex %}
    <script type="text/javascript">
      DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;
    </script>
{% endif %}
{% endblock %}
{% block body %}

   <h1 id="global-module-index">{{ _('Global Module Index') }}</h1>
{% if builder == 'web' and freqentries %}
   <p>{{ _('Most popular modules:') }}</p>
   <div class="modulecloud">
   {%- for module in freqentries %}
     <a href="../q/{{ module.name|e }}/" style="font-size: {{ module.size }}%">{{ module.name|e }}</a>
   {%- endfor %}
   </div>
{% endif %}
{% if builder == 'web' %}
   <form class="pfform" action="" method="get">
     {{ _('Show modules only available on these platforms') }}:<br>
     {% for pl in platforms -%}
     <input type="checkbox" name="pf" value="{{ pl }}" id="pl-{{ pl }}"
            {%- if pl in showpf %} checked="checked"{% endif %}>
     <label for="pl-{{ pl }}">{{ pl }}</label>
     {% endfor %}
     <input type="hidden" name="newpf" value="true">
     <input type="submit" value="Apply">
   </form>
{% endif %}

   {%- for letter in letters %}
   <a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a> {% if not loop.last %}| {% endif %}
   {%- endfor %}
   <hr/>

   <table width="100%" class="indextable" cellspacing="0" cellpadding="2">
   {%- for modname, collapse, cgroup, indent, fname, synops, pform, dep in modindexentries %}
   {%- if not modname -%}
   <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
   <tr class="cap"><td></td><td><a name="cap-{{ fname }}"><strong>{{ fname }}</strong></a></td><td></td></tr>
   {%- else -%}
   <tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
     <td>{% if collapse -%}
       <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
            class="toggler" style="display: none" />
         {%- endif %}</td>
     <td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
     {% if fname %}<a href="{{ fname }}">{% endif -%}
     <tt class="xref">{{ modname|e }}</tt>
     {%- if fname %}</a>{% endif %}
   {%- if pform[0] %} <em>({{ pform|join(', ') }})</em>{% endif -%}
   </td><td>{% if dep %}<strong>{{ _('Deprecated')}}:</strong>{% endif %}
     <em>{{ synops|e }}</em></td></tr>
   {%- endif -%}
   {% endfor %}
   </table>

{% endblock %}
